/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package apus.persistence.memory;

import apus.entity.Organization;
import apus.persistence.OrganizationDAO;
import java.util.HashMap;
import java.util.Map;

/**
 * @author  Maxim Vasilevsky
 * @author  Roman Dyatkovsky
 * @since APUS v0.2
 * @see AbstractMemoryDAO
 * @see OrganizationDAO
 */
public class MemoryOrganizationDAO extends MemorySubscriberDAO<Organization> implements OrganizationDAO {
    
    private static Map<Integer,Organization> dataSource = new HashMap<>();
    private static Integer counter = 1;
      
    @Override
    protected Map<Integer, Organization> getDataSource() {
        return dataSource;
    }

    @Override
    protected Integer getAndIncreaseCounter() {
        return counter++;
    }

}
